package com.keycloak.admin.exception;

public enum RequestError {
    REQUEST_ERROR_UNKNOWN_ERROR(1, "unknown error", "未知错误"),
    REQUEST_ERROR_PHONE_NUMBER_ERROR(2, "phone number error", "手机号码错误"),
    REQUEST_ERROR_VCODE_ERROR(3, "vcode error", "短信验证码错误"),
    REQUEST_ERROR_PHONE_NUMBER_IS_EXIST(4, "cell is exist", "手机号码已经被注册过"),
    REQUEST_ERROR_VCODE_IS_NOT_EXIST(5, "you haven't got vcode", "还没有获取过短信验证码"),
    REQUEST_ERROR_REGISTER_FAILED(6, "sorry,register failed", "注册失败"),
    REQUEST_ERROR_LOGIN_FAILED(7, "sorry,signin failed", "登录失败"),
    REQUEST_ERROR_ACCOUNT_IS_NOT_EXIST(8, "account is not exist", "账号不存在"),
    REQUEST_ERROR_RESET_PASSWORD_FAILED(9, "reset password failed", "重置密码失败"),
    REQUEST_ERROR_UPDATE_ENTITY_LOST_ID(10, "update entity lost id", "更新实体类信息没有id"),
    REQUEST_ERROR_VCODE_INVALIDE(11, "vcode invalide", "vcode失效"),
    REQUEST_ERROR_BODY_NOT_FOUND(12, "requestBody is not found", "requestBody没数据"),
    REQUEST_ERROR_PASSWORD_ERROR(13, "password error", "密码错误"),
    REQUEST_ERROR_ADD_ENTITY_FAILED(14, "add entity failed", "添加实体对象失败"),
    REQUEST_ERROR_REMOVE_ENTITY_FAILED(15, "remove entity failed", "删除实体对象失败"),
    REQUEST_ERROR_UPDATE_ENTITY_FAILED(16, "update entity failed", "更新实体对象失败"),
    REQUEST_ERROR_CONNT_ACCESS_SWAGGER(17, "Sorry!you can't access swagger2 page.", "Sorry!you can't access swagger2 page."),
    REQUEST_ERROR_PARAMETER_ERROR(18, "Request parameter does not meet requirements", "请求参数不符合要求"),
    REQUEST_ERROR_USER_IS_NOT_EXIST(19, "user is not exist", "用户不存在"),
    REQUEST_ERROR_USER_ACTIVE_FAILED(20, "user active failed", "用户激活失败"),
    REQUEST_ERROR_USER_TYPE_ERROR(21, "user type error", "用户类型错误"),
    REQUEST_ERROR_INFO_IS_ALREADY_EXIST(22, "info is already exist", "信息已经存在"),
    REQUEST_ERROR_INFO_IS_NOT_EXIST(23, "info is not exist", "信息不存在"),
    REQUEST_ERROR_NO_ACCESS_AUTHORITY(24, "sorry,you can't access this api.", "没有访问权限"),
    REQUEST_ERROR_USER_NOT_ACTIVE(25, "user is not active", "用户未激活"),
    REQUEST_ERROR_OUT_TRADE_NO_IS_EMPTY(26, "outTradeNo is empty", "支付交易单号为空"),
    REQUEST_ERROR_WEBSOCKET_CLIENT_IS_NOT_FOUND(27, "websocket client is not found", "WebSocket客户端没有找到"),
    REQUEST_ERROR_AUTH_IS_NOT_EXIST(28, "auth is not exist", "用户登录账号不存在"),
    REQUEST_ERROR_ADMIN_IS_NOT_EXIST(29, "admin is not exist", "超级管理员登录账号不存在"),
    REQUEST_ERROR_DRIVER_IS_NOT_EXIST(30, "driver is not exist", "司机信息不存在"),
    REQUEST_ERROR_DISPATCHER_IS_NOT_EXIST(31, "dispatcher is not exist", "调度员信息不存在"),
    REQUEST_ERROR_PASSENGER_IS_NOT_EXIST(32, "passenger is not exist", "乘客信息不存在"),
    REQUEST_ERROR_SERVICE_PLACE_IS_NOT_EXIST(33, "service place is not exist", "服务点不存在"),
    REQUEST_ERROR_ORDER_IS_NOT_EXIST(34, "order is not exist", "订单信息不存在"),
    REQUEST_ERROR_VEHICLE_IS_NOT_EXIST(35, "vehicle is not exist", "车辆不存在"),
    REQUEST_ERROR_ASSIGN_ORDER_NO_DRIVER(36, "assign order no driver", "派单没有指定有效的司机"),
    REQUEST_ERROR_PASSWORD_ERROR_OR_USER_IS_NOT_EXIST(37, "password error or user is not exist", "密码错误或用户不存在"),
    REQUEST_ERROR_CELL_OR_PASSWORD_ERROR(38, "phone or password error", "手机号码或密码错误"),
    REQUEST_ERROR_ACCOUNT_IS_ALREADY_EXIST(39, "account is already exist", "账号已经存在"),
    REQUEST_ERROR_USER_TYPE_IS_NOT_EXIST(40, "usertype is not exist", "用户类型不存在"),
    REQUEST_ERROR_PHONE_NUMBER_LENGTH_ERROR(41, "phone number length error", "手机号码长度错误"),
    REQUEST_ERROR_PHONE_NUMBER_FORMAT_ERROR(42, "phone number formet error", "手机号码格式错误"),
    REQUEST_ERROR_A_FOREIGN_KEY_IS_NULL(43, "a foreign key is null", "某个外键为空"),
    REQUEST_ERROR_FRANCHISEE_IS_NOT_EXIST(44, "franchisee is not exist", "加盟商不存在"),
    REQUEST_ERROR_ORDERNO_IS_EMPTY(45, "orderno is empty", "订单号为空"),
    REQUEST_ERROR_PASSWORD_LENGTH_TOO_SHORT(46, "password length too short", "密码长度不够8位字符"),
    REQUEST_ERROR_CLIENT_IS_NOT_LISTENING(47, "client is not is listening", "司机或者加盟商不在听单状态"),
    REQUEST_ERROR_APPKEY_IS_INVALID(48, "appkey is invalid", "appkey无效"),
    REQUEST_ERROR_PARAMS_PAGE_IS_INVALID(49, "page is invalid", "page最小必须为1"),
    REQUEST_ERROR_PARAMS_PAGESIZE_IS_INVALID(50, "pageSize is invalid", "pageSize最小必须为1"),
    REQUEST_ERROR_WEBSOCKET_DISPATCHER_OFFLINE(51, "dispatcher is offline", "调度员未收到消息"),
    REQUEST_ERROR_DRIVER_IS_OFFLINE(52, "driver is offline", "司机不在线，无法接收消息"),
    REQUEST_ERROR_MANAGER_IS_NOT_EXIST(53, "manager is not exist", "管理员信息不存在"),
    REQUEST_ERROR_WEBSOCKET_MANAGER_OFFLINE(54, "manager of franchisee is offline", "加盟商联系人不在线，无法收到消息"),
    REQUEST_ERROR_ASSIGN_ORDER_FAIL(55, "assign order fail", "指派订单失败"),
    REQUEST_ERROR_PASSWORD_NULL(56, "password error", "密码不能为空"),
    REQUEST_ERROR_FRANCHISEE_WEBSOCKET_CLIENT_IS_OFF_LINE(57, "franchisee  is off line", "加盟商已下线"),
    REQUEST_ERROR_WEBSOCKET_CLIENT_IS_OFF_LINE(58, "websocket client is off line", "加盟商或司机已下线"),
    REQUEST_ERROR_PASSENGER_ASSIGN_ORDER_TO_DRIVER_FAIL(59, "assign order fail ", "抱歉，司机没有应答，请再次选择"),
    REQUEST_ERROR_PASSENGER_CANCEL_ORDER(60, "order already cancel ", "订单已被乘客取消"),
    REQUEST_ERROR_CHIEFDISPATCHER_NOTICE_TO_DISPATCHER(61, "assign order fail ", "抱歉，没有找到专车，请下次再试"),
    REQUEST_ERROR_DRIVER_ALREADY_ACCEPT_ORDER(62, "driver already accept order ", "司机已接单"),
    REQUEST_ERROR_CANCEL_ORDER(63, "can't cancel other user's order ", "此订单不属于您"),
    REQUEST_ERROR_DRIVER_IS_HANDLING_IMMEDIATELY_ORDER(64, " driver is handing the immediately order ", "司机曾经接过单，确定再给他派单吗?"),
    REQUEST_ERROR_DRIVER_IS_SERVICING_ORDER(65, " driver is in service,please choose other driver  ", "司机正在运营中，请另外安排司机"),
    REQUEST_ERROR_DRIVER_IS_SERVICING_SURE_ASSIGN_ORDER(66, " driver is in service, sure assign?  ", "司机正在运营中，确定再给他派单吗?"),
    REQUEST_ERROR_OS_VERSION(67, " os version error  ", " 数据协议中 os 为非约定值 "),
    REQUEST_ERROR_PUSH_LOCATION_TO_PASSENGER(68, "driver is not is listening", "乘客socket不在线"),
    REQUEST_ERROR_PASSENGER_ORDER_BEDOING(69, "driver is doing this order", "此订单已被司机处理，不能取消"),
    REQUEST_ERROR_ALREADY_RECEIVED(70, "driver is doing this order", "此订单已回过款"),
    REQUEST_ERROR_ORDER_ALREADY_BEEN_DONE(71, "the order had been done ", "此订单已被处理"),
    REQUEST_ERROR_PASSWORD_LENGTH_TOO_LOGN(72, "password length too long", "密码长度不能超过18位字符"),
    REQUEST_ERROR_NO_VEHICLE_TYPE(73, "not setting vehicle type.", "错误，没有指定车辆的类型！"),
    REQUEST_ERROR_B2B_REPEAT_CANCLE(75, "order already cancel ", "订单已经被取消"),
    REQUEST_ERROR_LOGIN_FAILED_IS_NOT_EXIST(80, "login failed is not exist", "账号或者密码错误，登录失败"),
    REQUEST_ERROR_STATUS_ILLEGAL(81, "status  is  illegal!", " 状态值不合法 "),
    REQUEST_ERROR_PLATE_NO_REPEAT(82, "plate no repeat!", " 车牌号重复 "),
    REQUEST_ERROR_REFUSE_ORDER(83, "order refuse failed ", "拒单失败，订单已经处理过"),
    REQUEST_ERROR_UPDATE_ORDER_STATUS(84, "order status update failed! ", "订单状态更新失败，请确认订单状态。"),
    REQUEST_ERROR_FIND_MLIEAGE_DETAIL_FAIL_ONE(85, "find mlieage detail fail! ", "非里程计价类型"),
    REQUEST_ERROR_FIND_MLIEAGE_DETAIL_FAIL_TWO(86, "find mlieage detail fail! ", "里程计价类型,无分段明细"),
    REQUEST_ERROR_ORDER_OVERDUE(87, "scheduled time overdue! ", "预约单，已超过出发时间"),
    REQUEST_ERROR_WECHAT_BINDED(88, "wechat already be binded cell", "非微信登录用户或微信已绑定过手机"),
    REQUEST_ERROR_CELL_BINDED(89, "cell already be binded wechat ", "此手机号已绑定过微信"),
    REQUEST_ERROR_DRIVER_CANNOT_STRANFER_ORDER(90, "have no permission", "司机没有转单权限"),
    REQUEST_ERROR_DRIVER_CANNOT_ACCEPT_STRANFER_ORDER(91, "has been processed", "该订单已被转单人处理"),
    REQUEST_ERROR_BUNDLER_ORDER(92, "bundle order", "打包订单不能转单"),
    REQUEST_ERROR_PARAMS_illegal(500, " parameters are illegal! ", " 请检查参数是否正确 "),
    REQUEST_ERROR_GET_AIRPORT_INFO_FAIL(501, " get airport info fail ", " 获取航班信息失败 "),

    REQUEST_ERROR_OFF_TO_CHEIF(502, " get airport info fail ", " 没有开启中转到总调度功能 "),
    REQUEST_ERROR_ORDER_ALREADY_BEEN_DONE_BY_CHEIF(503, "the order had been done by cheif  ", "已被总调度处理过  "),
    REQUEST_ERROR_AIRPORTID(504, " parameters are illegal! ", " 请检查airportId "),
    REQUEST_ERROR_CAN_NOT_CHANGE_DESTINATION(505, " can't change destination ", "不能修改目的地 "),
    REQUEST_ERROR_CHANGE_DESTINATION_FAIL(506, "change destination fail ", "修改目的地失败，获取不到司机位置"),

    REQUEST_ERROR_DRIVER_CHANGE_VEHICLE_PRIVILEGE_INVALID(598, "have no privilege for change vehicle  ", "没有权限修改车辆  "),
    REQUEST_ERROR_SEND_VOUCHER_PRIVILEGE_INVALID(599, "have no privilege for send voucher  ", "没有赠送优惠券的权限 "),


    REQUEST_ERROR_GET_PRICE_FAIL(600, " get price fail, please check the parms ", "索价失败，请检查参数是否正确"),
    REQUEST_ERROR_MSG_CONNETC_FAIL(678, " websocket connect exception  ", " 此用户 websocket 连接动作超过单位时间内次数限制 "),
    REQUEST_ERROR_FIND_VEHICLE(700, " one plate assigned any driver   ", " 找车异常，一个车牌 同时被多个司机使用  "),
    REQUEST_ERROR_OTHER_DRIVER_ALREADY_ACCEPT_ORDER(777, "other driver already accept order ", "其他司机已接单"),
    REQUEST_ERROR_DATA_IS_NULL(888, "  data is null  ", " 数据为空"),

    REQUEST_ERROR_HAVE_NO_ORDER_FEE(800, "have no order fee ", "没有查询到订单的里程费用"),

    REQUEST_NOT_BAND_ALIPAY(970, "haven't band alipay", "没有绑定支付宝，请先进行绑定"),
    REQUEST_WITHDRAW_NOT_COMPLETE(971, "withdraw haven't complete", "有未完成的提现，请稍后再试"),
    REQUEST_ILLEGAL_DAY(972, "time is illegal", "请在约定的时间段内进行提现操作"),
    REQUEST_TIME_OF_WITHDRAW_IS_EXCESS(973, "time of withdraw is excess", "本月累计提现次数超过了限制"),
    REQUEST_WITHDRAW_MIN_LIMIT(974, "min limit", "提取金额不能小于单笔最小额度"),
    REQUEST_WITHDRAW_MAX_LIMIT(975, "max limit", "提取金额不能大于单笔最大额度"),
    REQUEST_WITHDRAW_TOTAL_AMOUNT_LIMIT(976, "total amount limit", "本月累计提现金额超过了限制"),
    REQUEST_WITHDRAW_HAVE_NO_MONEY(978, "amount limit", "提现金额超过可提金额"),
    REQUEST_WITHDRAW_HAVE_RECEIVED(979, "have  received", "完成所有回款后才可以进行提现操作"),
    REQUEST_ERROR_ALREADY_APPLY_ADJUST(980, "already apply adjust", "已经申请过结算"),

    REQUEST_ERROR_TOKEN_INVALIDE(999, "token invalide", "token失效");


    private int code;
    private String message;
    private String description;

    RequestError(int code, String message, String description) {
        this.code = code;
        this.message = message;
        this.description = description;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
}
